package com.awei.study.design.found.singleton;

/**
 * 懒汉式1
 */
public class SingletonL1 {

    private SingletonL1() {}

    private static SingletonL1 instance;

    // 多线程下不安全
    public SingletonL1 getInstance() {
        if(instance == null) {
            return new SingletonL1();
        }
        return instance;
    }
}
